<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
		<meta name="keywords" content="" />
		<style type="text/css">
			input{
				width: 5rem;
				height: 1rem;
				border: 1px solid #ccc;
				border-radius: 0.2rem;
				padding-left: 0.2rem;
				outline: none;
			}
		</style>
		<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js" type="text/javascript"></script>
		<script src="js/progress.js" type="text/javascript"></script>
		<script src="js/flexible.js"></script>
	</head>

	<body>
		<input type="text" value="" placeholder="可自定义left初始百分比" required="required"/>
		<button>生成可滑动滚动条</button>
		<div class="box2"></div>
		<script type="text/javascript">
			$('button').click(function(){
				var percent = $('input').val()
				if(percent.indexOf('%')!=-1){
					percent = percent.replace("%","")/100;
				}else{
					percent = Number(percent)
				}
				var aaa = new Progress_({
					$box_: $('.box2'),
					maxWidth_: '8rem',
					percent: percent
				})
				aaa.init();
			})
		</script>
	</body>

</html>